package com.espoir.shp.read02;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class ShapePrj {
	/**
	 * 创建prj文件
	 * @author ygc
	 * @throws IOException 
	 */
	public static void createPrjAlbers(String path,String fileName) throws IOException {
		FileOutputStream out=null;
		try {
			File file=new File(path+File.separator+fileName);
			file.createNewFile();
			String PrjInfo="PROJCS[\"WGS_1984_Albers\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Albers\"],PARAMETER[\"false_easting\",0.0],PARAMETER[\"false_northing\",0.0],PARAMETER[\"central_meridian\",105.0],PARAMETER[\"standard_parallel_1\",25.0],PARAMETER[\"standard_parallel_2\",47.0],PARAMETER[\"latitude_of_origin\",0.0],UNIT[\"Meter\",1.0]]";
			out = new FileOutputStream(file);
			out.write(PrjInfo.getBytes());
		} catch (Exception e) {
			e.printStackTrace();		
		}finally {
			out.close();
		}
	}
}
